<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>函数默认值</h2>
</body>
<script>
    function getData(name='无名',age=0,address='无名地址') {
        console.log(name)
        console.log(age)
        console.log(address)
    }

    getData('张三',20,'北京')

   
</script>
</html>